var isIE = function(){ 
    return (window.navigator.userAgent.indexOf("MSIE")>=1)
}

if(isIE()&&window.HTMLElement){
    console.log('执行文件-兼容iview select')
    if(Object.getOwnPropertyNames(HTMLElement.prototype).indexOf('dataset')===-1){
        Object.defineProperty(HTMLElement.prototype, 'dataset', {
            get:function(){
                var attributes = this.attributes;
                var name = [],value = [];
                var obj = {};
                for(var i = 0; i<attributes.length; i++){
                    if(attributes[i].nodeName.slice(0,5)=='date-'){
                        name.push(attributes[i].nodeName.slice(5))
                        value.push(attributes[i].nodevalue)
                    }
                }
                for(var j=0;j<name.length;j++){
                    obj[name[j]] = value[j]
                }
                return obj;
            }
        })
    }
}